package com.xiyu.service.vo.material.Inventory;

import com.xiyu.service.vo.material.order.baseVO.MaterialInventoryBase;
import com.xiyu.service.vo.material.order.baseVO.MaterialInventoryDetailBase;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import jakarta.validation.constraints.*;
import org.hibernate.validator.constraints.Length;
import jakarta.validation.Valid;
import com.xiyu.service.enums.common.CommonStatusEnum;
import com.xiyu.service.framework.validation.InEnum;
import java.math.BigDecimal;

@Schema(description = "更新盘点单")
@Data
public class InventoryUpdateInput extends MaterialInventoryBase {

    @Schema(description = "物资盘点明细")
    @Valid
    private List<detail> details;

    @Schema(description = "物资盘点单主键ID")
    private Long id;

    @Schema(description = "物资盘点明细")
    @Data
    @Valid
    public static class detail extends MaterialInventoryDetailBase {

        @Schema(description = "物资盘点明细主键ID")
        private Long id;

        @Schema(description = "操作方式")
        private String operateType;

        @Schema(description = "实盘库存")
        @PositiveOrZero(message = "实盘库存必须大于等于0")
        @Digits(integer = 13, fraction = 4, message = "实盘库存格式无效")
        @NotNull(message = "实盘库存不能为空")
        private BigDecimal inventoryStockNum;
    }

}